#ifndef _CAPTURE_H_
#define _CAPTURE_H_
#include "define.h"
#include <pcap.h> 
class ccapture
{
public:
	bool open( const char* netname );
	bool close();
	void capture( unsigned char* data, int len);
public:
	int send(unsigned char *smac, unsigned long sip);
private:
	static winapi RecvThread(void* param);
	pthread  m_hRecvThread;
	bool     m_bExit;
private:
	pcap_t*   adhandle;
};
#endif
